import QtQuick 1.0
import Qt 4.7
import QtMultimediaKit 1.1

Item{
    id: mainmenu
    objectName: "mainmenu"

    Image {
        id: background
        source: "images/bg/bg_awal.png"
        x:0
        y:0
    }
    PlayMusic{
        id : bgSound
       }

    Button {
        id: playButton
        imagesource: "images/bu/bu_play.png"
        width: 123
        height: 47
        x: 200
        y: 460
        onClicked: {
            console.log("play")
            mainWidget.setScreen(2)
        }
    }

//    Button {
//        id: scoreButton
//        imagesource: "images/bu/bu_score.png"
//        width: 123
//        height: 47
//        x: 200
//        y: 500
//        onClicked: {
//            console.log("score")
//        }
//    }

    Button {
        id: soundButton
        imagesource: "images/bu/bu_soundawal.png"
        width: 55
        height: 43
        x: 268
        y: 530
        onClicked: {
            if(mainWidget.getSoundMute()){
                mainWidget.setSoundMute(false)
            } else {
                mainWidget.setSoundMute(true)
            }
        }
    }

    Button {
        id: musicButton
        imagesource: "images/bu/bu_musicawal.png"
        width: 55
        height: 43
        x: 200
        y: 530
        onClicked: {
            if (bgSound.playing)
            {
                mainWidget.setMusicMute(true);
                bgSound.stop()
            }
            else
            {
                mainWidget.setMusicMute(false);
                bgSound.play()
            }
        }
    }
}
